home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2004 December
/
2004-12 CHIP.iso
/
CHIP
/
Porady
/
Srodowisko PHP-MySQL
/
WAMP5 1.3
/
wamp5_1.3.exe
/
{app}
/
www
/
exemples
/
sqlite.php
< prev
next >
Wrap
PHP Script
|
2004-02-28
|
628b
|
26 lines
<?php
$filename = "sqlite.php";
highlight_file($filename);
//Ouverture de la base :
$db = sqlite_open('test.db');
//CrΘation de la requΩte :
//$sql = 'CREATE TABLE population (prenom varchar(30),nom varchar(30),email varchar(50));';
//$sql = 'INSERT INTO population (prenom, nom, email) values (\'frankiz\', \'daniel\', \'nagol@php.net\')';
$sql = 'SELECT nom, prenom, email from population';
//Execution de la requΩte :
$result = sqlite_query($db, $sql);
echo '<pre>';
while ($row = sqlite_fetch_array($result)){
print_r($row);
}
echo '</pre>';
//Fermeture de la base :
sqlite_close($db);
?>